import { setToken, getToken } from '@/utils/storage'
export default {
  // 开启命名空间
  namespaced: true,
  state: {
    // 加载页面获取token
    token: getToken()

  },
  mutations: {
    getToken (state, token) {
      // 将token 存入state
      state.token = token
      // 将token存入本地存储
      setToken(token)
    }

  },
  actions: {

  },
  getters: {

  }
}
